package org.link.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 
 * project_name:hibernate_annotation
 * package_name:org.link.bean
 * file_name:Special.java
 * @author Link
 * create_date:2015年12月15日 上午9:48:16
 * modified_date:
 * description:专业实体类
 *
 */

@Entity
@Table(name="t_special")
public class Special {

	@Id
	@GenericGenerator(name="systemUUID",strategy="uuid")//设置随机生成uuid
	@GeneratedValue(generator="systemUUID")
	@Column(name = "pid", insertable = true, updatable = true, nullable = false,length=36)
	private String pid;
	@Column(name="pname",length=50)
	private String pname;
	
	public Special() {
		super();
	}

	public Special(String pname) {
		super();
		this.pname = pname;
	}

	public Special(String pid, String pname) {
		super();
		this.pid = pid;
		this.pname = pname;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getPname() {
		return pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	@Override
	public String toString() {
		return "Special [pid=" + pid + ", pname=" + pname + "]";
	}
	
}
